﻿<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
<meta charset="utf-8">
<title>Spa Land - Body & Massage Therapy HTML Template | Products </title>

<!-- Stylesheets -->
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<link href="/css/responsive.css" rel="stylesheet">

<!--Color Switcher Mockup-->
<link href="/css/color-switcher-design.css" rel="stylesheet">

<!--Color Themes-->
<link id="theme-color-file" href="/css/color-themes/default-theme.css" rel="stylesheet">

<!--Favicon-->
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon">
<link rel="icon" href="/images/favicon.png" type="image/x-icon">

<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<!--[if lt IE 9]><script src="/https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script><![endif]-->
<!--[if lt IE 9]><script src="/js/respond.js"></script><![endif]-->
</head>

<body>
<div class="page-wrapper">
 	
    <!-- Preloader -->
    <div class="preloader"></div>
 	
    <!-- Main Header-->
    <header class="main-header header-style-three">
    	
        <!--Header Top-->
    	<div th:insert="~{header :: #header-top}"></div>
        <!-- End Header Top -->

        <!-- Header Lower -->
        <div class="header-lower">
            <div class="auto-container">
               <div th:insert="~{header :: #main-box}"></div>
            </div>
        </div>
        <!-- End Header Lower -->
        
        <!--Sticky Header-->
        <div th:insert="~{header :: #header-sticky}"></div>
        <!--End Sticky Header-->
    </header>
    <!--End Main Header -->
    
 	<!--Page Title-->
    <section class="page-title" style="background-image:url(/images/background/13.jpg);">
        <div class="auto-container">
        	<div class="inner-container clearfix">
	            <h1>产品</h1>
	            <ul class="bread-crumb clearfix">
	                <li><a href="index.html">首页 </a></li>
	                <li>产品 </li>
	            </ul>
        	</div>
        </div>
    </section>
    <!--End Page Title-->

    <!--Sidebar Page Container-->
    <div class="sidebar-page-container">
        <div class="auto-container">
            <div class="row clearfix">

                <!--content side-->
                <div class="content-side col-lg-9 col-md-8 col-sm-12 col-xs-12">
                    <div class="shop-upper-box clearfix">
                        <div class="items-label pull-left" th:text="'共搜索到 ' + ${#lists.size(pageInfo.list)} + ' 条结果'"></div>

                    </div>

                    <div class="row clearfix">
                        <!-- Shop item -->
                        <div class="shop-item col-lg-4 col-md-6 col-sm-6 col-xs-12" th:each="product:${pageInfo.list}">
                            <div class="inner-box">
                                <div class="image">
                                        <img style="width: 270px;height: 270px;" th:src="'http://47.94.10.67/images/' + ${product.imgUrl}" alt="">
                                    <div class="overlay-box">
                                        <div class="icon-box">
                                            <a th:href="'/cart/addCart?productId='+${product.id}" class="theme-btn btn-style-six">添加到购物车<i class="fa fa-shopping-cart"></i></a>
                                        </div>
                                    </div>
                                </div>
                                <div class="lower-content">
                                    <h3><a th:href="'/page/productDetail?id=' + ${product.id}" th:text="${product.title}"></a></h3>
                                    <del th:text="'原价：' + ${product.oldProce} + '元'"></del>
                                    <span class="price" th:text="'现价：'+${product.nowPrice} + '元'"></span>
                                    <div class="rating">
                                        <span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star-o"></span>
                                    </div>
                                </div>
                            </div>
                        </div>


                    </div>

                    <!-- Styled Pagination -->
                    <div class="styled-pagination text-center">
                        <ul class="clearfix">
                            <li th:if="${pageInfo.hasPreviousPage}"><a class="prev" th:href="'/page/product?pageNum='+ ${pageInfo.prePage}"><span class="fa fa-long-arrow-left"></span></a></li>
                            <li th:each="page:${pageInfo.navigatepageNums}">
                                <a th:href="'/page/product?pageNum='+ ${page}" th:text="${page}"> </a>
                            </li>

                            <li th:if="${pageInfo.hasNextPage}"><a class="next" th:href="'/page/product?pageNum='+ ${pageInfo.nextPage}"><span class="fa fa-long-arrow-right"></span></a></li>
                        </ul>
                    </div>
                </div>

                <!--Sidebar Side-->
                <div class="sidebar-side col-lg-3 col-md-4 col-sm-12 col-xs-12">
                    <aside class="sidebar shop-sidebar">
                        
                        <!--search box-->
                        <div class="sidebar-widget search-box">
                            <form method="post" onsubmit="return false">
                                <div class="form-group">
                                    <input type="search" name="search-field" id="productName" value="" placeholder="搜索产品" required="">
                                    <button type="submit" onclick="searchProduct()"><span class="icon fa fa-search"></span></button>
                                </div>
                            </form>
                        </div>



                        <!-- Top Related Posts -->
                        <div class="sidebar-widget related-posts">
                            <div class="sidebar-title"><h2>热门产品</h2></div>
                            <div class="widget-content">
                                <!-- Related Post -->
                                <div class="post" th:each="product:${pageInfos.list}">
                                    <figure class="post-thumb"><a th:href="'/page/productDetail?id=' + ${product.id}"><img th:src="'http://47.94.10.67/images/' + ${product.imgUrl}" alt=""></a></figure>
                                    <h4><a th:href="'/page/productDetail?id=' + ${product.id}" th:text="${product.title}" ></a></h4>
                                    <span class="price" th:text="'现价：'+${product.nowPrice} + '元'"></span>
                                    <div class="rating"><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star"></span><span class="fa fa-star-o"></span></div>
                                </div>


                            </div>
                        </div>
                    </aside>
                </div>
            </div>
        </div>
    </div>
    <!--End Sidebar Page Container-->


    
    <!-- Main Footer -->
    <div th:insert="~{footer :: #footer}"></div>
    <!-- End Main Footer -->

</div>    
<!--End pagewrapper-->

<div class="color-palate">
    <div class="color-trigger">
        <i class="fa fa-gear"></i>
    </div>
    <div class="color-palate-head">
        <h6>选择一个你喜欢的主题</h6>
    </div>
    <div class="various-color clearfix">
        <div class="colors-list">
            <span class="palate default-color active" data-theme-file="/css/color-themes/default-theme.css"></span>
            <span class="palate teal-color" data-theme-file="/css/color-themes/teal-theme.css"></span>
            <span class="palate navy-color" data-theme-file="/css/color-themes/navy-theme.css"></span>
            <span class="palate yellow-color" data-theme-file="/css/color-themes/yellow-theme.css"></span>
            <span class="palate blue-color" data-theme-file="/css/color-themes/blue-theme.css"></span>
            <span class="palate purple-color" data-theme-file="/css/color-themes/purple-theme.css"></span>
            <span class="palate olive-color" data-theme-file="/css/color-themes/olive-theme.css"></span>
            <span class="palate red-color" data-theme-file="/css/color-themes/red-theme.css"></span>
        </div>
    </div>

    <div class="palate-foo">
        <span>你可以很简单的改变主体颜色</span>
    </div>

</div>
<!-- /.End Of Color Palate -->

<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.min.js"></script>
<!--End Revolution Slider-->
<script src="/js/jquery-ui.js"></script>
<script src="/js/jquery.fancybox.js"></script>
<script src="/js/owl.js"></script>
<script src="/js/appear.js"></script>
<script src="/js/wow.js"></script>
<script src="/js/mixitup.js"></script>
<script src="/js/validate.js"></script>
<script src="/js/script.js"></script>
<!--Color Switcher-->
<script src="/js/color-settings.js"></script>
</body>
</html>
<script type="text/javascript">
    function searchService() {
        var question = $("#q").val().trim();
        window.location.href = '/gallery/searchGallery?question=' + question;
    }

    function searchProduct() {
        var productName = $("#productName").val().trim();
        window.location.href = '/product/searchProduct?productName='+productName;
    }


</script>